/*
 * @Author: asushiye
 * @Date: 2020-07-03 08:51:09
 * @Commit: file content
 */
import { Injectable } from '@angular/core';
import { AfMessageService, gw_code_g } from '@core';
import { _HttpClient } from '@delon/theme';
import { Observable } from 'rxjs';
@Injectable({
  providedIn: 'root'
})
export class CgDatatypeMappingService {
  constructor(
    private http: _HttpClient,
    private msg: AfMessageService
  ) {}

  public get httpClient(): _HttpClient {
    return this.http;
  }

  public query(params: any): Observable<any> {
    return this.http.get(`${gw_code_g}/db/datatype/mapping/query`, params);
  }

  // 删除历史表中
  public delete(id: any): Observable<any> {
    return this.http.get(`${gw_code_g}/db/datatype/mapping/delete/${id}`);
  }

  public rebuildDefault(): Observable<any> {
    return this.http.get(`${gw_code_g}/db/datatype/mapping/rebuild/default`);
  }

  public projectList(): Observable<any> {
    return this.http.get(`${gw_code_g}/db/datatype/mapping/project/list`);
  }
}
